<?php
class DatabaseModel extends Model{
	
	public function save_sqlite_path($path){
		$data['sqlite_path']=$path;
		$data['time_insert']=time();
		$last=M('sqlite_db','','')->db(1,'DB_CONFIG1')->order('sqlite_id desc')->find();
		if($last){
			$data['sqlite_version']=$last['sqlite_version']+0.01;
		}else{
			$data['sqlite_version']=1.0;
		}
		return M('sqlite_db','','')->db(1,'DB_CONFIG1')->add($data);
	}	
}
?>